I think the correct answer is, it depends......
Most machine controllers don't care about the line numbers most of the time.
Some older controllers might care all of the time.
There are certain times that most all controllers care about the order. For instance in the G7x series of lathe canned cycles, N block/line numbers must be included, they must follow a certain order and most of all, must be unique, not duplicated anywhere else in the program.
John